/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
//http://www.roseindia.net/jdbc/save_image.shtml
//http://apuntes.delibertad.com/java/cargar-imagen-guardada-en-mysql-desde-java/
//http://www.compujuy.com.ar/postx.php?id=47
//http://nullbrainexception.blogspot.com/2010/12/java-convertir-un-archivo-array-de.html
//http://www.mkyong.com/java/how-to-convert-byte-to-bufferedimage-in-java/
package Interface;

import entidades.*;
import Controladores.*;
import java.awt.Dimension;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Vector;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import javax.swing.ListSelectionModel;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;

/**
 *
 * @author Gatoper
 */
public class FMain extends javax.swing.JFrame {

    /**
     * Creates new form FMain
     */
    private JPIPet pi;
    private JPUPet pu;
    private JPIVeterinarian vi;
    private JPUVeterinarian vu;
    private JPIOwner oi;
    private JPUOwner ou;
    private JPIAppointment ap;
    private JPIMedicalRecord me;
    private VPIVacine va;

    public FMain() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        button1 = new java.awt.Button();
        BGopciones = new javax.swing.ButtonGroup();
        JPmain = new javax.swing.JPanel();
        TFfind = new javax.swing.JTextField();
        Bfind = new javax.swing.JButton();
        JCBtable1 = new javax.swing.JScrollPane();
        jScrollPane1 = new javax.swing.JScrollPane();
        TabOwners = new javax.swing.JTable();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        JCBtable2 = new javax.swing.JScrollPane();
        jScrollPane2 = new javax.swing.JScrollPane();
        TabVeterinarian = new javax.swing.JTable();
        JCBtable3 = new javax.swing.JScrollPane();
        jScrollPane3 = new javax.swing.JScrollPane();
        TabPets = new javax.swing.JTable();
        jLabel3 = new javax.swing.JLabel();
        JMenBPrincipal = new javax.swing.JMenuBar();
        JMenVeterinarian = new javax.swing.JMenu();
        JMIVCreate = new javax.swing.JMenuItem();
        JMenOwner = new javax.swing.JMenu();
        JMIOCreate = new javax.swing.JMenuItem();
        JMenPet = new javax.swing.JMenu();
        JMIPCreate = new javax.swing.JMenuItem();
        JMenOtros = new javax.swing.JMenu();
        JMIVacine = new javax.swing.JMenuItem();
        JMIAppointment = new javax.swing.JMenuItem();
        JMIMedicalRecord = new javax.swing.JMenuItem();

        button1.setLabel("button1");

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setMaximumSize(new java.awt.Dimension(784, 510));

        Bfind.setText("Search");
        Bfind.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BfindActionPerformed(evt);
            }
        });

        TabOwners.setModel(new javax.swing.table.DefaultTableModel(

        ));
        TabOwners.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                TabOwnersMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                TabOwnersMouseEntered(evt);
            }
        });
        jScrollPane1.setViewportView(TabOwners);

        JCBtable1.setViewportView(jScrollPane1);

        jLabel1.setText("Owners");

        jLabel2.setText("Veterinarian");

        TabVeterinarian.setModel(new javax.swing.table.DefaultTableModel(

        ));
        TabVeterinarian.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                TabVeterinarianMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                TabVeterinarianMouseEntered(evt);
            }
        });
        jScrollPane2.setViewportView(TabVeterinarian);

        JCBtable2.setViewportView(jScrollPane2);

        TabPets.setModel(new javax.swing.table.DefaultTableModel(

        ));
        TabPets.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                TabPetsMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                TabPetsMouseEntered(evt);
            }
        });
        jScrollPane3.setViewportView(TabPets);

        JCBtable3.setViewportView(jScrollPane3);

        jLabel3.setText("Pets");

        javax.swing.GroupLayout JPmainLayout = new javax.swing.GroupLayout(JPmain);
        JPmain.setLayout(JPmainLayout);
        JPmainLayout.setHorizontalGroup(
            JPmainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(JPmainLayout.createSequentialGroup()
                .addGroup(JPmainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(JPmainLayout.createSequentialGroup()
                        .addComponent(TFfind, javax.swing.GroupLayout.PREFERRED_SIZE, 324, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(Bfind))
                    .addGroup(JPmainLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(JPmainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(JCBtable1, javax.swing.GroupLayout.PREFERRED_SIZE, 378, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel1)
                            .addComponent(jLabel2)
                            .addComponent(JCBtable2, javax.swing.GroupLayout.PREFERRED_SIZE, 378, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel3)
                            .addComponent(JCBtable3, javax.swing.GroupLayout.PREFERRED_SIZE, 378, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        JPmainLayout.setVerticalGroup(
            JPmainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, JPmainLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(JPmainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TFfind, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(Bfind))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel1)
                .addGap(16, 16, 16)
                .addComponent(JCBtable1, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jLabel2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(JCBtable2, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jLabel3)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(JCBtable3, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        JMenVeterinarian.setText("Veterinarian");

        JMIVCreate.setText("Create");
        JMIVCreate.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JMIVCreateActionPerformed(evt);
            }
        });
        JMenVeterinarian.add(JMIVCreate);

        JMenBPrincipal.add(JMenVeterinarian);
        JMenVeterinarian.getAccessibleContext().setAccessibleName("veterinarian");
        JMenVeterinarian.getAccessibleContext().setAccessibleDescription("");

        JMenOwner.setText("Owner");

        JMIOCreate.setText("Create");
        JMIOCreate.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JMIOCreateActionPerformed(evt);
            }
        });
        JMenOwner.add(JMIOCreate);

        JMenBPrincipal.add(JMenOwner);

        JMenPet.setText("Pet");

        JMIPCreate.setText("Create");
        JMIPCreate.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JMIPCreateActionPerformed(evt);
            }
        });
        JMenPet.add(JMIPCreate);

        JMenBPrincipal.add(JMenPet);

        JMenOtros.setText("Otros");

        JMIVacine.setText("Vacine");
        JMIVacine.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JMIVacineActionPerformed(evt);
            }
        });
        JMenOtros.add(JMIVacine);

        JMIAppointment.setText("Appointment");
        JMIAppointment.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JMIAppointmentActionPerformed(evt);
            }
        });
        JMenOtros.add(JMIAppointment);

        JMIMedicalRecord.setText("Medical Record");
        JMIMedicalRecord.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JMIMedicalRecordActionPerformed(evt);
            }
        });
        JMenOtros.add(JMIMedicalRecord);

        JMenBPrincipal.add(JMenOtros);

        setJMenuBar(JMenBPrincipal);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(JPmain, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(813, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(JPmain, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void JMIVCreateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JMIVCreateActionPerformed
        // TODO add your handling code here:
        limp();
        vi = new JPIVeterinarian();
        vi.setLocation(420, 10);
        this.add(vi);
    }//GEN-LAST:event_JMIVCreateActionPerformed

    private void BfindActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BfindActionPerformed
        // TODO add your handling code here:
        EntityManagerFactory emf;
        EntityManager em;
        Map<String, String> properties = new HashMap<>();
        properties.put("javax.persistence.jdbc:user", "root");
        properties.put("javax.persistence.jdbc:password", "");
        emf = Persistence.createEntityManagerFactory("HPVAS", properties);
        em = emf.createEntityManager();
        String[] palab = this.TFfind.getText().split(" ");
        PersonJpaController pjc = new PersonJpaController(emf);
        OwnerJpaController ojc = new OwnerJpaController(emf);
        VeterinarianJpaController vjc = new VeterinarianJpaController(emf);
        PetJpaController petjc = new PetJpaController(emf);

        Vector listaOwners = new Vector();
        Vector listaVeterinarian = new Vector();
        Vector listaPet = new Vector();


        for (int p = 0; p < palab.length; p++) {
            //Obtener todos los posibles datos por palabra
            listaOwners.addAll(ojc.findOwnernm(palab[p]));
            listaOwners.addAll(ojc.findOwnerBySSN(palab[p])); 
            listaVeterinarian.addAll(vjc.findVeterinariannm(palab[p]));
            listaVeterinarian.addAll(vjc.findVeterinarianBySSN(palab[p]));
            listaPet.addAll(petjc.findPetnm(palab[p]));
            listaPet.addAll(petjc.findPetBySpecie(palab[p]));

        }
        //[ara los owners
        Object datosOwners[][] = new Object[listaOwners.size()][6];
        for (int i = 0; i < listaOwners.size(); i++) {
            Owner oun = (Owner) (listaOwners.get(i));
            datosOwners[i][0] = oun.getName();
            datosOwners[i][1] = oun.getLasname();
            datosOwners[i][2] = oun.getSsn();
            datosOwners[i][3] = oun.getBirthday();
            datosOwners[i][4] = oun.getBirthplace();
            datosOwners[i][5] = oun.getClass();
        }
        String[] tituloOwners = new String[]{"name", "Lastname", "ssn", "Birthday", "Birthplace", "Type"};
        TableModel TdatosModel = new DefaultTableModel(datosOwners, tituloOwners);
        this.TabOwners.setModel(TdatosModel);
        this.TabOwners.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        this.TabOwners.getSelectedRow();

        //PAra los veterinarios
        Object datosVet[][] = new Object[listaVeterinarian.size()][9];
        for (int i = 0; i < listaVeterinarian.size(); i++) {
            Veterinarian oun = (Veterinarian) (listaVeterinarian.get(i));
            datosVet[i][0] = oun.getName();
            datosVet[i][1] = oun.getLasname();
            datosVet[i][2] = oun.getSsn();
            datosVet[i][3] = oun.getBirthday();
            datosVet[i][4] = oun.getBirthplace();
            datosVet[i][5] = oun.getFocusofpractice();
            datosVet[i][6] = oun.getGraduatedAt();
            datosVet[i][7] = oun.getSalary();
            datosVet[i][8] = oun.getEspecialitie();
        }
        String[] tituloVeterinarian = new String[]{"name", "Lastname", "ssn", "Birthday", "Birthplace", "Focus", "Graduated", "Salary","Especiality"};
        TableModel TdatosModel2 = new DefaultTableModel(datosVet, tituloVeterinarian);
        this.TabVeterinarian.setModel(TdatosModel2);
        this.TabVeterinarian.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        this.TabVeterinarian.getSelectedRow();


        Object datosPet[][] = new Object[listaPet.size()][5];
        for (int i = 0; i < listaPet.size(); i++) {
            Pet oun = (Pet) (listaPet.get(i));
            datosPet[i][0] = oun.getName();
            datosPet[i][1] = oun.getAge();
            datosPet[i][2] = oun.getSpecies();
            datosPet[i][3] = oun.getWeight();
            datosPet[i][4] = oun.getOwner().getName();
        }
        String[] tituloPet = new String[]{"name", "age", "species", "weight", "OWNER_name"};
        TableModel TdatosModel3 = new DefaultTableModel(datosPet, tituloPet);
        this.TabPets.setModel(TdatosModel3);
        this.TabPets.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        this.TabPets.getSelectedRow();
    }//GEN-LAST:event_BfindActionPerformed

    private void JMIPCreateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JMIPCreateActionPerformed
        // TODO add your handling code here:
        limp();
        pi = new JPIPet();
        pi.setLocation(420, 10);
        this.add(pi);
        this.repaint();
    }//GEN-LAST:event_JMIPCreateActionPerformed
    private void limp() {
        try {
            this.remove(vi);
        } catch (Exception e) {
        }
        try {
            this.remove(pi);
        } catch (Exception e) {
        }
        try {
            this.remove(pu);
        } catch (Exception e) {
        }
        try {
            this.remove(vu);
        } catch (Exception e) {
        }
        try {
            this.remove(oi);
        } catch (Exception e) {
        }
        try {
            this.remove(ou);
        } catch (Exception e) {
        }
        try {
            this.remove(ap);
        } catch (Exception e) {
        }
        try {
            this.remove(va);
        } catch (Exception e) {
        }
        try {
            this.remove(me);
        } catch (Exception e) {
        }
        this.repaint();
    }
    private void TabOwnersMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_TabOwnersMouseClicked
        // TODO add your handling code here:
        int row = TabOwners.rowAtPoint(evt.getPoint());
        /*String[] result = new String[5];
        for (int i = 0; i < 5; i++) {
            result[i] = (String)TabOwners.getModel().getValueAt(row, i);
        }*/
        limp();
        EntityManagerFactory emf = Persistence.createEntityManagerFactory("HPVAS");
        EntityManager em = emf.createEntityManager();
        OwnerJpaController OwnJpaC=new OwnerJpaController(emf);
        
        Owner owner=OwnJpaC.findOwner((String)TabOwners.getModel().getValueAt(row, 0));;/*new Owner(result[0], result[1], result[2], result[3], result[4]);*/
        ou = new JPUOwner(owner);
        ou.setLocation(420, 10);
        this.add(ou);
        
    }//GEN-LAST:event_TabOwnersMouseClicked

    private void TabOwnersMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_TabOwnersMouseEntered
        // TODO add your handling code here:
        //System.out.print("2");
    }//GEN-LAST:event_TabOwnersMouseEntered

    private void JMIVacineActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JMIVacineActionPerformed
        // TODO add your handling code here:
        limp();
        va = new VPIVacine();
        va.setLocation(420, 10);
        this.add(va);
        this.repaint();
    }//GEN-LAST:event_JMIVacineActionPerformed

    private void JMIAppointmentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JMIAppointmentActionPerformed
        // TODO add your handling code here:
        limp();
        ap = new JPIAppointment();
        ap.setLocation(420, 10);
        this.add(ap);
        this.repaint();
    }//GEN-LAST:event_JMIAppointmentActionPerformed

    private void JMIMedicalRecordActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JMIMedicalRecordActionPerformed
        // TODO add your handling code here:
        limp();
        me = new JPIMedicalRecord();
        me.setLocation(420, 10);
        this.add(me);
        this.repaint();
    }//GEN-LAST:event_JMIMedicalRecordActionPerformed

    private void TabVeterinarianMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_TabVeterinarianMouseClicked
        int row = TabVeterinarian.rowAtPoint(evt.getPoint());
        Object[] result = new Object[9];
        for (int i = 0; i < 9; i++) {
            result[i] = TabVeterinarian.getModel().getValueAt(row, i);
        }
        limp();
        vu = new JPUVeterinarian(new Veterinarian((String)result[5], (Integer)result[7], (String)result[6],(String)result[8], (String)result[0], (String)result[1], (String)result[2], (String)result[3], (String)result[4]));
        vu.setLocation(420, 10);
        this.add(vu);
    }//GEN-LAST:event_TabVeterinarianMouseClicked

    private void TabVeterinarianMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_TabVeterinarianMouseEntered
        // TODO add your handling code here:
    }//GEN-LAST:event_TabVeterinarianMouseEntered

    private void TabPetsMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_TabPetsMouseClicked
        int row = TabPets.rowAtPoint(evt.getPoint());
        /*String[] result = new String[5];
        for (int i = 0; i < 5; i++) {
            result[i] = (String)TabOwners.getModel().getValueAt(row, i);
        }*/
        limp();
        EntityManagerFactory emf = Persistence.createEntityManagerFactory("HPVAS");
        PetJpaController Petjpc=new PetJpaController(emf);        
        Pet pet=Petjpc.findPet((String)TabPets.getModel().getValueAt(row, 0));/*new Owner(result[0], result[1], result[2], result[3], result[4]);*/
        pu = new JPUPet(pet);
        pu.setLocation(420, 10);
        this.add(pu);
    }//GEN-LAST:event_TabPetsMouseClicked

    private void TabPetsMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_TabPetsMouseEntered
        // TODO add your handling code here:
    }//GEN-LAST:event_TabPetsMouseEntered

    private void JMIOCreateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JMIOCreateActionPerformed
        // TODO add your handling code here:
        limp();
        oi = new JPIOwner();
        oi.setLocation(420, 10);
        this.add(oi);
    }//GEN-LAST:event_JMIOCreateActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(FMain.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(FMain.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(FMain.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(FMain.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new FMain().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup BGopciones;
    private javax.swing.JButton Bfind;
    private javax.swing.JScrollPane JCBtable1;
    private javax.swing.JScrollPane JCBtable2;
    private javax.swing.JScrollPane JCBtable3;
    private javax.swing.JMenuItem JMIAppointment;
    private javax.swing.JMenuItem JMIMedicalRecord;
    private javax.swing.JMenuItem JMIOCreate;
    private javax.swing.JMenuItem JMIPCreate;
    private javax.swing.JMenuItem JMIVCreate;
    private javax.swing.JMenuItem JMIVacine;
    private javax.swing.JMenuBar JMenBPrincipal;
    private javax.swing.JMenu JMenOtros;
    private javax.swing.JMenu JMenOwner;
    private javax.swing.JMenu JMenPet;
    private javax.swing.JMenu JMenVeterinarian;
    private javax.swing.JPanel JPmain;
    private javax.swing.JTextField TFfind;
    private javax.swing.JTable TabOwners;
    private javax.swing.JTable TabPets;
    private javax.swing.JTable TabVeterinarian;
    private java.awt.Button button1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    // End of variables declaration//GEN-END:variables
}
